package com.jason.controller;

import com.jason.base.BaseProcess;
import com.jason.core.util.ExcelOutPutUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

@RestController
@RequestMapping("/export")
@Api(value = "导出Excel接口", description = "导出Excel接口")
public class ExportController extends BaseProcess {

    @ApiOperation(value = "导出Excel", notes = "导出Excel")
    @PostMapping(value = "excel")
    public Object exportExcel(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response) {
        ExcelOutPutUtil.exportExcel(params, request, response);
        return setSuccessResult();
    }



}
